package com.ftf.tp.blog.application.assembler;

import com.ftf.tp.blog.application.dto.message.SupportMessage;
import com.ftf.tp.blog.application.vo.ArticleIndexVO;
import com.ftf.tp.blog.application.vo.ArticleInfoVO;
import com.ftf.tp.blog.domain.article.dos.ArticleIndexDO;
import com.ftf.tp.blog.domain.article.dos.ArticleInfoDO;
import com.ftf.tp.blog.domain.article.dos.SupportDO;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

import java.util.List;

/**
 * 文章相关领域对象转换器
 *
 * @author tanghao
 * @date 2022/6/26
 */
@Mapper
public interface ArticleAssembler {

    ArticleAssembler INSTANCE = Mappers.getMapper(ArticleAssembler.class);

    List<ArticleIndexVO> doToVOList(List<ArticleIndexDO> articleIndexDOList);

    ArticleInfoVO doToVO(ArticleInfoDO articleInfoDO);

    SupportDO dtoToDo(SupportMessage supportDTO);
}
